import psycopg
DSN = 'dbname=benchmark user=ravi host=shell2.adytum.us'
print "Opening connection using dns:", DSN
conn = psycopg.connect(DSN)
curs = conn.cursor()

counter = 0
while counter < 1000:
    curs.execute("insert into person(last_name, first_name) values('test','test')")
    counter = counter + 1
conn.commit()
